﻿<UserControl
	x:Class="DeltaEngine.Editor.ContinuousUpdater.ContinuousUpdaterControl"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:local="clr-namespace:DeltaEngine.Editor.ContinuousUpdater"
	mc:Ignorable="d"
	d:DataContext="{d:DesignInstance Type=local:ContinuousUpdaterDesign, IsDesignTimeCreatable=True}"
	d:DesignWidth="300" d:DesignHeight="800"
	HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Foreground="#FFCACACA" MinWidth="300">
	<UserControl.Resources>
		<Style TargetType="Label" x:Key="DeltaLabel">
			<Setter Property="FontSize" Value="16" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#e2e2e2" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
		</Style>
		<Style TargetType="TextBox" x:Key="DeltaTextBox">
			<Setter Property="FontSize" Value="16" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#FFFBFBFB" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
			<Setter Property="BorderBrush" Value="{x:Null}" />
		</Style>
		<Style TargetType="ComboBox" x:Key="DeltaComboBox">
			<Setter Property="FontSize" Value="16" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#FFFBFBFB" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
			<Setter Property="Padding" Value="3 4 0 0" />
		</Style>
		<Style TargetType="Button" x:Key="DeltaButton">
			<Setter Property="FontSize" Value="16" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#FF9C9C9C" />
			<Setter Property="Foreground" Value="#FFFFFFFF" />
		</Style>
	</UserControl.Resources>
	<Grid Background="#FFF0F0F0">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="8" />
			<ColumnDefinition Width="84" />
			<ColumnDefinition Width="6" />
			<ColumnDefinition />
			<ColumnDefinition Width="4" />
			<ColumnDefinition Width="24" />
			<ColumnDefinition Width="8" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="12" />
			<RowDefinition Height="619" />
			<RowDefinition Height="7" />
			<RowDefinition Height="30" />
			<RowDefinition Height="12" />
		</Grid.RowDefinitions>
		<Label
			Content="Select Project To Watch" Grid.ColumnSpan="4"
			Margin="0,0,0,0" Style="{StaticResource DeltaLabel}" Grid.Column="1" Grid.Row="1" />
		<Label
			Content="Project" Style="{StaticResource DeltaLabel}"
			Margin="0,0,0,0" Grid.Column="1" Grid.Row="3" />
		<ComboBox
			Name="ProjectComboBox"
			Text="{Binding Path=AssemblyFilePath.Name}"
			ItemsSource="{Binding Path=Projects}"
			Style="{StaticResource DeltaComboBox}"
			ToolTip="Select which assembly file to watch. It will be executed automatically each time it is updated."
			Grid.Column="3" Grid.Row="3" Margin="1,0,0,0" Padding="0 4 0 0" IsEditable="True" />
		<Button
			Name="SelectProjectFilePathButton" Content=".." Grid.Column="5" Grid.Row="3"
			ToolTip="Select Assembly file to update continuously."
			Click="SelectAssemblyFilePathButtonClick" />
		<Label
			Content="Test to run" Style="{StaticResource DeltaLabel}" Grid.Row="5" Grid.Column="1" Margin="0,0,0,0" />
		<ComboBox
			Name="TestComboBox" Grid.Column="3" Grid.Row="5" Margin="1,0" Grid.ColumnSpan="3"
			SelectedItem="{Binding Path=SelectedTest}"
			ItemsSource="{Binding Path=Tests}"
			Style="{StaticResource DeltaComboBox}"
			ToolTip="Select a visual unit test or the Main entry point to execute." />
		<Image
			Name="UpdatingImage" Source="..\Images\Updating.png" Grid.Column="3" Grid.Row="1"
			RenderTransformOrigin="0.5,0.5"
			IsEnabled="{Binding Path=IsUpdating, UpdateSourceTrigger=PropertyChanged}" Margin="136,6,6,6">
			<Image.RenderTransform>
				<RotateTransform x:Name="SpinnerRotate" CenterX="0.5" CenterY="0.5" />
			</Image.RenderTransform>
			<Image.Triggers>
				<EventTrigger RoutedEvent="ContentControl.Loaded">
					<BeginStoryboard>
						<Storyboard>
							<DoubleAnimation
								Storyboard.TargetProperty="RenderTransform.Angle"
								From="0" To="360" Duration="0:0:01.3" RepeatBehavior="Forever" />
						</Storyboard>
					</BeginStoryboard>
				</EventTrigger>
			</Image.Triggers>
		</Image>
		<Button
			Click="OpenInVisualStudioButton" Style="{StaticResource DeltaButton}"
			ToolTip="Open currently selected Test file in Visual Studio for editing."
			Margin="0,0,111,0" Foreground="White" Grid.Row="9" Grid.Column="1"
			BorderThickness="0" Grid.ColumnSpan="3">
			<StackPanel Orientation="Horizontal">
				<TextBlock VerticalAlignment="Center" Margin="4 0 0 0">Visual Studio</TextBlock>
				<Image
				Source="..\Images\VisualStudioIcon.png" Height="30" Width="30" Margin="15 0 0 0" />
			</StackPanel>
		</Button>
		<Button
			Content="Pause" Name="AddCyrillicButton" Click="StopUpdatingButtonClick"
			ToolTip="Open the xml file to see what this tool generated and for further customization."
			FontSize="14" Grid.Row="9" Style="{StaticResource DeltaButton}" Grid.Column="3"
			HorizontalAlignment="Left" Width="59" Margin="60,0,0,0">
			<Button.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFA0A0A0" Offset="0" />
					<GradientStop Color="#FF8B8B8B" Offset="1" />
				</LinearGradientBrush>
			</Button.Background>
		</Button>
		<Button
			Content="Restart" Click="Restart" Style="{StaticResource DeltaButton}"
			HorizontalAlignment="Right" Width="70" Foreground="White"
			Grid.Row="9" RenderTransformOrigin="0.5,0.5" Grid.Column="3" Grid.ColumnSpan="3">
			<Button.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFA0A0A0" Offset="0" />
					<GradientStop Color="#FF8B8B8B" Offset="1" />
				</LinearGradientBrush>
			</Button.Background>
		</Button>
		<Button Content="?" Grid.Column="5" Grid.Row="1" Style="{StaticResource DeltaButton}" FontWeight="Bold" FontSize="20" />
		<ListBox Grid.ColumnSpan="5" Grid.Column="1" HorizontalAlignment="Left" Height="619" Grid.Row="7" VerticalAlignment="Top" Width="284"/>
	</Grid>
</UserControl>